clear
close all
clc

fntsize=14;
w=450;
h=w*2/(1+sqrt(5));
col=[0;0.5;0.8;1]*ones(1,3);
corr=0.003;
se=1.96;
printyes=1;

%% Load data
[data labels]=xlsread('DataForFiguresTables.xlsx','Ind_VShape','A1:I22');
[~,K]=size(data);
for i=1:K
    assignin('base',labels{i},data(:,i))
end

weight=BLS_om7a;
X = [ones(21,1) BLS_LS_diff_tr];
beta = ((X'*diag(weight)*X)\X'*diag(weight)*VShape_deepening);
regline = beta(1) + beta(2)*(-0.3:0.1:0.1);

%% Plot industry V-shape deepening vs. industry LS decline
figure('position',[0 0 w h]);
scatter(BLS_LS_diff_tr,VShape_deepening,weight*10000,ones(21,3)*0.7,'filled')
hold on
a=plot((-0.3:0.1:0.1),regline);
set(a,'linewidth',2,'color','k')
grid
set(gca,'ylim',[-0.175 0.05],'ytick',(-0.15:0.05:0.05),'xtick',-0.3:0.05:0.1,'xlim',[-0.3 0.1],'ticklabelinterpreter','latex','fontsize',fntsize-2,'ycolor',col(1,:))
xlabel(gca,'Industry labor share decline','fontsize',fntsize,'color',col(1,:),'interpreter','latex')
ylabel(gca,'Industry V-Shape deepening'  ,'fontsize',fntsize,'color',col(1,:),'interpreter','latex')
if printyes==1
    print('../Figures/Fig_SC_LStr_VShape_LStr.eps','-depsc')
end
